#version 450 core

layout(location = 0) in vec3 a_Position;
layout(location = 1) in vec4 a_Color;
layout(location = 2) in float a_TexIndex;
layout(location = 3) in vec2 a_TexCoord;

layout(std140, binding = 0) uniform Camera {
    mat4 u_ViewProjection;
};

struct VertexOutput {
    vec4 Color;
    float TexIndex;
    vec2 TexCoord;
};

layout(location = 0) out VertexOutput Output;

void main() {
    Output.Color = a_Color;
    Output.TexIndex = a_TexIndex;
    Output.TexCoord = a_TexCoord;
    gl_Position = u_ViewProjection * vec4(a_Position, 1.0f);
}